# Replace upload metadata

Completely replaces the upload's metadata with the provided data, removing any existing metadata not included in the request. Only the upload owner can modify metadata. Requires authentication.

Endpoint: POST /api/v1/uploads/{id}/meta
Version: 1.0
Security: header

## Path parameters:

  - `id` (string, required)
    UUID with type prefix
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

## Response 200 fields (application/json):

  - `uploadId` (string, required)
    Internal id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `uploaderId` (string,null)
    User who physically uploaded this file. Null for platform-owned uploads (e.g., default covers). This is an audit/meta field — use ownerId for authorization.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `ownerId` (string, required)
    Entity that owns this upload (user, channel/group, or event). TypeID prefix indicates the owner type.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `attachedToId` (string,null)
    Entity this upload is attached to (e.g., a post or event). NULL for standalone uploads like avatars, covers, or media library items.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `uploadType` (string, required)
    Type of the upload
    Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER"

  - `meta` (object)
    Meta data

  - `meta.blurhash` (string,null)

  - `meta.name` (string,null)

  - `meta.altText` (string,null)

  - `size` (integer, required)
    Size in bytes of all the files in this upload

  - `files` (array, required)
    List of all the files this upload has

  - `files.uri` (string,null, required)
    Full url of the file

  - `files.fileId` (string, required)
    File id
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `files.extension` (string, required)
    File extension
    Example: "mp4"

  - `files.original` (boolean, required)
    true if this file is original, false if it is a derivative

  - `files.meta` (object, required)
    File metadata. Contains optional values for width, height etc.

  - `files.meta.duration` (number,null)
    Video duration in seconds

  - `files.meta.width` (integer,null)
    Media width

  - `files.meta.height` (integer,null)
    Media height

  - `files.meta.codec` (string,null)
    Video codec

  - `files.meta.rotate` (integer,null)
    Rotation in degrees

  - `files.size` (integer, required)
    File size in bytes

  - `files.createdAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `files.updatedAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `files.type` (string, required)
    File type
    Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER"

  - `tags` (array, required)
    List of tags attached to upload
    Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event"

  - `error` (string,null)
    Upload processing error

  - `cached` (boolean)
    true if cached

  - `logs` (string,null)
    Logs

  - `remote` (boolean)
    true if this upload is remote

  - `createdAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

  - `updatedAt` (string, required)
    Example: "2022-03-10T16:15:50Z"

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


## Response 400 fields
